package logic.common.team.processes;

import networking.messages.teamMessages.ProcessCreateMessage;
import fileHandling.language.Lang;
import fileHandling.language.interfaces.HUDText;
import logic.common.team.Team;
import logic.ships.drone.Drone;

public class DroneProcess extends TeamProcess {
	
	public DroneProcess(Team team) {
		super(team, DRONE_TIME);
	}
	
	@Override
	public void finish() {
		Drone drone = team.addNewDrone();
		drone.setLocalTranslation(team.getMotherShip().getRandomDroneSpawn(drone));
		team.getIngameState().addNode(drone);
	}
	
	@Override
	public Lang getDescription() { return HUDText.Drone; }
	
	@Override
	public ProcessCreateMessage getProcessCreateMessage() {
		return new ProcessCreateMessage(team.getFraction(), getID(), ProcessType.Drone);
	}
}